package com.example.landmanagement.service.impl;

import com.example.landmanagement.dao.adminInfoMapper;
import com.example.landmanagement.pojo.adminInfo;
import com.example.landmanagement.service.adminInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class adminInfoServiceImpl implements adminInfoService {

    @Resource
    private adminInfoMapper adminInfoMapper;

    @Override
    public adminInfo login(adminInfo adminInfo) {

        return adminInfoMapper.selectByParam(adminInfo);
    }

    @Override
    public boolean add(adminInfo admin) {
        return adminInfoMapper.insert(admin)==1;
    }
}
